package com.china.bike.dao;

import com.china.bike.dto.BikeListParam;
import com.china.bike.entity.BikeInfo;
import com.china.bike.entity.BikeUseRecord;

import java.util.List;
import java.util.Map;

public interface BikeInfoDao {

    int saveBikeInfo(List<BikeInfo> bikeInfoList);

    int updateBikeStatus(BikeInfo bikeInfo);

    List<BikeInfo> listBikes(BikeListParam bikeListParam);

    Integer listBikeCount(BikeListParam bikeListParam);

    List<BikeUseRecord> getBikeUseRecord(List<Long> bikeIds);

    List<Map<String, String>> getBikeUseRecordCountByBikeId(List<Long> bikeIds);

    List<BikeInfo> listBikes(Integer status);

    void driveBike(BikeUseRecord bikeUseRecord);

    List<BikeUseRecord> getBikeByUserId(Long userId, Integer start, Integer limit);

    void lockBike(BikeUseRecord bikeUseRecord);

    int getBikeByUserIdCount(Long userId);

    int deleteBike(String bikeNum);
}
